<!DOCTYPE html>

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="jpath" value="${pageContext.request.contextPath}" />
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0,user-scalable=0" />
	
	<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
	<script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
	<script src="http://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
	<link rel="stylesheet" href="${jpath}/static/plugins/Frontend/css/cpsc.css" />
		<link rel="stylesheet" href="${jpath}/static/plugins/webuploader/css/webuploader.css" />
		<link rel="stylesheet" href="${jpath}/static/plugins/webuploader/style.css" />
		<script src="${jpath}/static/plugins/webuploader/dist/webuploader.js"></script>
    	<script src="${jpath}/static/plugins/webuploader/upload.js"></script>
    	<script src="${jpath}/js/system_plugins.js"></script>
    	<link rel="stylesheet" href="${jpath}/static/assets/css/font-awesome.min.css" />

		<link rel="stylesheet" href="${jpath}/static/assets/css/ace.min.css" />
		<link rel="stylesheet" href="${jpath}/static/assets/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="${jpath}/static/assets/css/ace-skins.min.css" />
		<script src="${jpath}/static/assets/js/ace-extra.min.js"></script>
	<title>产品上传</title>
		<script type="text/javascript">
		//method="post" action="${jpath}/student/manager/add"
		var  jpath="${jpath}";
	function getForm(_form){
		var dataJson = "";
				var dataArr = [];
				$(_form).find("input").each(function(index,_this){
					var iptName = $(_this).attr("name");
					if(iptName != "" && iptName != null){
						dataArr.push(iptName+":'"+$(_this).val()+"'");
						dataJson+=",";
					}
				});
				dataJson ="{"+ dataArr.join(",")+"}";
				var jsonForms = eval('('+ dataJson +')');
				return jsonForms;
	}
		$(function(){
				$("#stuForm").loadCombox();
			$("#subBtn").click(function(){
				var jsonForms = getForm("#stuForm");
				$.post("${jpath}/frontend/manager/addcp",jsonForms,function(data){
					console.log(data);
					var json = $.parseJSON(data);
					alert(json.resMsg);
				});
				$("#stuForm input").val("");
				
			});
		});
	</script>

	
</head>

<body>
	<div class="bj">
			<div class="container top">
				   <div class="row">
				      <div class="col-2"><img src="${jpath}/static/plugins/Frontend/img/back.png" style="margin-left: -250px;"></div>
				      <div class="col-9">产品上传</div> 
				      <div class="col-1"></div>     
				   </div>
				</div>
			<div class="kuang">
				
				<div class="container">
				   <div class="row">
				     	<div class="col-12"><span class="shuxian">|</span> &nbsp;产品上传</div>   
				   </div>
					<form class="form-horizontal" id="stuForm" role="form">
				<input type="hidden" name="id" id="id" value="${yh.id}" class="col-xs-10 col-sm-5"/>
			
							
				
						<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-3"> 标题 </label>

					<div class="col-sm-9">
						<input type="text" name="bt" id="bt"  class="col-xs-10 col-sm-5" />
					</div>
				</div>		
				<div class="space-4"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-3"> 时限 </label>

					<div class="col-sm-9">
						<input type="text" name="sx" id="sx"  class="col-xs-10 col-sm-5" />
					</div>
				</div>	
				<div class="space-4"></div>
						<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-3"> 银行 </label>

					<div class="col-sm-9">
						<input type="text" name="yh" id="yh"  class="col-xs-10 col-sm-5" />
					</div>
				</div>		
				<div class="space-4"></div>	
						<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-3"> 简介 </label>

					<div class="col-sm-9">
						<input type="text" name="jj" id="jj"  class="col-xs-10 col-sm-5" />
					</div>
				</div>		
				<div class="space-4"></div>	
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-3"> 条件 </label>

					<div class="col-sm-9">
						<input type="text" name="tj" id="tj"  class="col-xs-10 col-sm-5" />
					</div>
				</div>	
				<div class="space-4"></div>		
		
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 联系我们 </label>

					<div class="col-sm-9">
					<input type="text" name="lxwm" id="lxwm" placeholder="联系我们" class="col-xs-10 col-sm-5"/>
				
					</div>
				</div>
					
				<div class="space-4"></div>		
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-1">产品分类 </label>

					<div class="col-sm-9">
					<input type="comboxSelect" 
					name="cpfl" 
					id="cpfl" 
					value="3"
					loadUrl="${jpath}/yonghuhangye/manager/find"
					/>
						
					</div>
				
				</div>
				<div class="space-4"></div>		
					<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 发布人 </label>

					<div class="col-sm-9">
					<input type="text" name="fbr" id="fbr" placeholder="标题" class="col-xs-10 col-sm-5"  value="	${yhs.yhxm}"/>
				
					</div>
				</div>	
				<div class="space-4"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 金额（/万元） </label>

					<div class="col-sm-9">
					<input type="text" name="je" id="je" placeholder="金额" class="col-xs-10 col-sm-5" />
				
					</div>
				</div>	
				<div class="space-4"></div></br>
			
				<div class="form-gr0oup">
				
				<label class="col-sm-3 control-label no-padding-right" for="form-field-3"> 产品图片 </label>
				<div class="col-sm-9">
				<input type="hidden" name="fujianId" id="fujianId" />
					   <div id="wrapper">
        <div id="container">
            <!--头部，相册选择和格式选择-->

            <div id="uploader">
                <div class="queueList">
                    <div id="dndArea" class="placeholder">
                        <div id="filePicker"></div>
                        <p>或将照片拖到这里，单次最多可选300张</p>
                    </div>
                </div>
                <div class="statusBar" style="display:none;">
                    <div class="progress">
                        <span class="text">0%</span>
                        <span class="percentage"></span>
                    </div><div class="info"></div>
                    <div class="btns">
                        <div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
                    </div>
                </div>
            </div>
        </div>
        </div>
    </div>
				</div>	
				<div class="space-4"></div>
				
				<div class="clearfix form-actions">
					<div class="col-md-offset-3 col-md-9">
						<button class="btn btn-info"  style="float: left;margin-top: 19px;" id="subBtn" type="button">
							<i class="icon-ok bigger-110"></i>
							保存
						</button>

						&nbsp; &nbsp; &nbsp;
						<button  style="float:right" class="btn" type="reset">
							<i class="icon-undo bigger-110"></i>
							还原
						</button>
					</div>
				</div>					
			</form>
				</div>

			</div>
	</div>

</body>
</html>